<template>
    <div>
        <el-form :model="InboundOrderDetalis">
            <el-row>
                <el-col :span="22" :offset="1">
                    <el-form-item>
                        <el-table border stripe :data="tableData">
                            <el-table-column fixed prop="DeviceName" label="名称" align="center" width="300"></el-table-column>
                            <el-table-column prop="DeviceModel" label="规格型号" align="center" width="300"></el-table-column>
                            <el-table-column prop="Amount" label="数量" align="center" ></el-table-column>
                            <el-table-column prop="outboundAmount" label="出库数量"  align="center"></el-table-column>
                            <el-table-column prop="Unit" label="单位" align="center"></el-table-column>
                            <el-table-column prop="Price" label="单价" align="center"></el-table-column>
                            <el-table-column prop="TotalPrice" label="最高总价"  align="center"></el-table-column>
                        </el-table>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="21" :offset="1">
                    <el-form-item label="备注" label-width="50px">
                        <el-input v-model="InboundOrderDetalis.Remark" type="textarea"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </div>
</template>

<script>
    export default {
        name: "InboundMaterialDetalis",
        props: {
            InboundOrderDetalis: {
                type: Object,
                required: true
            }
        },
        watch: {
            InboundOrderDetalis: function (val) {
                let ids = []
                val.inboundRecord.forEach(item => {
                    ids.push(item.Id)
                })
                let loadding = this.openLoading();
                this.$http.post('Report/GetDetialInboundRecord', ids).then(res => {
                    loadding.close();
                    this.tableData = res.data
                })
            }
        },
        data() {
            return {
                tableData: [],
            }
        },
        methods: {

        }
    }
</script>

<style scoped>

</style>
